<?php echo $this->render('user/head.phtml');?>
<script>
$(function(){
$("#day_of_birth").datepicker({'dateFormat':'yy-mm-dd', 'changeYear':true, 'yearRange':'1960:2010'});
});
</script>
<form action='/user/update-profile' method='post'/>
<table id='table_profile' class="user_table left">
   <?php $session = new Zend_Session_Namespace('account'); ?>
   <input type="hidden" name="id" value='<?php echo $session->user->get("id");?>'/>
   <input type="hidden" name="ts_created" value="<?php echo $session->user->get('ts_created');?>"/>
   <input type="hidden" name="wealth" value="<?php echo $session->user->get('wealth');?>"/>
   <input type="hidden" name="type" value="<?php echo $session->user->get('type');?>"/>
 <?php if (isset($session->user) && $session->user->get("username")!=''){?>
  <tr><td class="td_desc">用户名：</td><td><?php echo $session->user->get("username"); ?></td></tr>
   <?php }?> 
 <?php if (isset($session->user) && $session->user->get("email")!=''){?>
  <tr><td class="td_desc">电子邮箱：</td><td><?php echo $session->user->get("email");?></td></tr>
   <?php } ?> 
 <tr><td class="td_desc">姓名：</td><td><input class="profile-input" type="text" name="realname" value="<?php echo $session->user->get('realname');?>"/></td></tr>
 <tr>
   <td class="td_desc">性别：</td>
   <td>
     <select name='gender_id'>
       <?php print make_options(array('1'=>'男', '0'=>'女'), $session->user->get("gender_id"));?> 
     </select>
   </td>
 </tr>
 <tr><td class="td_desc">出生日期：</td>
   <td>
     <input type="input" name="day_of_birth" class="profile-input" id="day_of_birth" value="<?php echo $session->user->get('day_of_birth');?>" maxlength="11"/>
 </td>
 </tr>
 <tr>
   <td></td><td>入学年份</td><td>省份</td><td>大学</td><td>专业</td>
 </tr>
 <tr>
   <td class="td_desc">就读大学：</td>
   <td>
     <?php $years=array();for($i=1950; $i<2011; $i++) { $years[$i] = $i; }?>
	   <select name='college_entrance_year'>
	     <?php print make_options($years, $session->user->get('college_entrance_year'));?>
	   </select>年
   </td>
   <td>
     <select class='select_province' id='select_province' name='province' size='1'>
       <?php print make_options($this->provinces, $this->college_province);?>
     </select>
   </td>
   <td>
     <select class='select_college' id='select_colleges' name='college_id' size='1'>
       <!-- <option value=''>请选择</option> -->
       <?php print make_options($this->colleges, $session->user->get("college_id"));?>
     </select>
   </td>
   <td>
     <select class='select_college' id='select_school' name='school_id' size='1'>
       <option value=''>请选择</option>
       <?php print make_options($this->schools, $session->user->get('school_id'));?>
     </select>
   </td>
 </tr>
 <tr>
   <td class="td_desc">自我介绍：
   </td>
   <td colspan='4'>
     <textarea name="signature" class="profile-textarea"><?php echo $session->user->get('signature');?></textarea>
   </td>
 </tr>
 <tr>
   <td></td><td colspan='2'><input type='submit' value='保存'></td>
 </tr>  

</table>
</form>
<?php echo $this->render('user/foot.phtml');?>
